<!-- <template>
    <div class="app-container">
      <StorageSpecKeywordEdit  ref="openStorageSpecKeywordEdit" @refresh="refresh"></StorageSpecKeywordEdit>
      <el-form @submit.native.prevent :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px" :label-position="labelPosition">
        <el-form-item label="关键词" prop="keyword">
          <el-input
            v-model="queryParams.keyword"
            placeholder="请输入关键词"
            clearable
            @keyup.enter.native="enterClick"
          />
        </el-form-item>
          
        <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="mini" @click="getList">搜索</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
        </el-form-item>
      </el-form>
      <el-table
        v-loading="loading"
        :data="memberManageCilentList"
      >
        <af-table-column fixed="left" align="center" class-name="small-padding fixed-width" width="120">
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="text"
  
              @click="memberManageClientEdit(scope.row)"
            >修改</el-button>
            <el-button
              size="mini"
              type="text"
  
              @click="memberManageClientDelete(scope.row)"
            >删除</el-button>
          </template>
        </af-table-column> 
        <af-table-column label="关键词" prop="keyword" fixed="left"/>
        <af-table-column label="纱支" prop="wpgga" />
        <af-table-column label="工艺" prop="wpggb" />
        <af-table-column label="工序" prop="wpggc" />
        <af-table-column label="用途" prop="wpggd" />
        <af-table-column label="产地" prop="wpgge" />
        <af-table-column label="漂染性" prop="wpggf" />
        <af-table-column label="生产日期" prop="wpggg" />
        <af-table-column label="颜色" prop="wpggh" />
        <af-table-column label="制单人" prop="rsopmc" />
        <af-table-column label="创建时间" prop="prrq" />
        <af-table-column label="备注" prop="itbz" />
      </el-table>
       <pagination
          v-show="total>0"
          :total="total"
          :page.sync="pageNum"
          :limit.sync="pageSize"
          @pagination="getList"
        />
    </div>
  </template>
  
  <script>
  import { getStorageSpecKeyword} from "@/api/storage/storageSetting/storageSpecKeyword";
  import StorageSpecKeywordEdit from './storageSpecKeywordEdit.vue'
  
  export default {
    name: "storageSpecKeyword",
    components:{StorageSpecKeywordEdit},
    data() {
      return {
        // 显示搜索条件
        showSearch: true,
        //表格加载
        loading:true,
         //对齐
        labelPosition: "right",
        // 查询参数
        queryParams: {
          
        },
        // 规格关键词列表
        storageSpecKeywordList: [],
        //页数
        pageSize: 10,
        //页码
        pageNum:1,
        // 总条数
        total: 0,
      };
    },
    beforeRouteEnter(to, from, next) {
      const params = to.params
      next(vm => {   
        if(Object.keys(params).length > 0) {
          if(to.params.refresh == true) {
            vm.getList()
          }
        }
      })
    },
    created() {
      this.getList()
    },
    methods: {
      /** 查询规格关键词 */
      getList() {
        this.loading = true
        getStorageSpecKeyword(this.queryParams, {pageNum:this.pageNum, pageSize:this.pageSize}).then(response => {
          this.storageSpecKeywordList = response.rows;
          this.total = response.total;
          this.loading = false
        })
      },
  
      /**修改 */
      memberManageClientEdit(row) {
        const data = JSON.parse(JSON.stringify(row))
        this.$refs.openStorageSpecKeywordEdit.open(data)
      },

      /**删除 */
      memberManageClientDelete() {
        this.$modal.confirm("是否删除？").then(()=> {
          
        }).catch(() => {})
      },
  
      refresh() {
        this.getList()
      },
  
      /**enter键触发 */
      enterClick(e) {
        this.getList()
      },
      /** 重置按钮操作 */
      resetQuery() {
        this.reset()
        this.getList()
      },
      reset() {
        Object.assign(this.$data, this.$options.data())
      },
    }
  };
  </script>
   -->